Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="http://maps.googleapis.com/maps/api/js"> </script> <script> var map; function initialize() { var mapOpt = { center:new google.maps.LatLng(51.508742,-0.120850), zoom:6, mapTypeId:google.maps.MapTypeId.ROADMAP }; map=new google.maps.Map(document.getElementById("googleMap"),mapOpt); } google.maps.event.addDomListener(window, 'load',initialize); </script> </head> <body> <button onclick="alert(map.getMapTypeId());">Get map type</button> <br><br> <div id="googleMap"style="width:400px;height:300px;"></div> </body> <!-- Mirrored from www.w3schools.com/googleapi/tryit.asp?filename=tryhtml_ref_getmaptypeid by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:16:55 GMT --> </html>
Result:
Try it Yourself - © w3schools.com